#include "config_main.h"
#ifdef DDENN_TIMERS_DOWN
/*
 * timers.h
 *
 *  Created on: 06.06.2009
 *      Author: Admin
 */

#ifndef TIMERS_DOWN_H_
#define TIMERS_DOWN_H_

#include "config_timers_down.h"


#include <stdlib.h>
#include <XPLMDataAccess.h>
#include "xplane_tools.h"
#include "tools.h"

/**************************************************************************************/
//
//          it provides ddenn/timers/
//
/*************************************************************************************/
namespace DdennTimersDown{
struct ddenn_timer{
	float starttime;
	float pausetime;
	float pausedtime;
	int ispaused;
	int start_hours;
	int start_minutes;
	int start_seconds;
};

extern ddenn_timer DdennTimersDown[DDENN_TIMERS_DOWN_COUNT];



void RegisterDdennTimersDown();
void UnregisterDdennTimersDown();



void dden_timer_create (ddenn_timer *  t);
void dden_timer_set (ddenn_timer *  t);
void ddenn_timer_pause (ddenn_timer *  t);
void ddenn_timer_play (ddenn_timer *  t);
float ddenn_timer_gettime (ddenn_timer  t);




int GetTimerHours ( void *               inRefcon);
int GetTimerMinutes ( void *               inRefcon);
int GetTimerSeconds ( void *               inRefcon);

void SetTimerHours (void *               inRefcon, int     inValue);
void SetTimerMinutes (void *               inRefcon,   int   inValue);
void SetTimerSeconds (void *               inRefcon, int inValue);
int GetTimerExpired ( void *               inRefcon);
float GetTimerRaw ( void *               inRefcon);

int GetTimerPause ( void *               inRefcon);
void SetTimerPause(void *               inRefcon,
                 int                  inValue);


}
/**************************************************************************************/
//
//          end of ddenn/timers/
//
/*************************************************************************************/


#endif /* TIMERS_H_ */
#endif
